<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 现在共有100匹马跟100块石头,马分3种,大型马;中型马跟小型马。其中一匹大马一次可以驮3块石头,中型马可以驮2块,而小型马2头可以驮一块石头。问需要多少匹大马,中型马跟小型马? (问题的关键是刚好必须是用完100匹马)

    // x y z

    /* for (var x = 0; x <= 100; x++) {
        for (var y = 0; y <= 100; y++) {
            for (var z = 0; z <= 100; z++) {
                if(x+y+z == 100 && 3*x + 2*y + z/2 == 100){
                    console.log(x,y,z);
                }
            }
        }
    } */

    /* for (var x = 0; x <= 100 / 3; x++) { // 3 => 33
        for (var y = 0; y <= 100 / 2; y++) { // 2 => 50
            var z = (100 - x - y)
            if (3 * x + 2 * y + z / 2 == 100) {
                console.log(x, y, z);
            }
        }
    } */



</script>

</html>